import $ from 'https://cdn.skypack.dev/blingblingjs';

const $body = $('body');
const $demo = $('div');

// click to toggle transition in/out
$body.on('click', e => {
  // get current transition
  const txn = $demo.attr('transition-style');

  // set new transition
  $demo.attr('transition-style', txn.includes('out') ?
  txn.replace('out', 'in') :
  txn.replace('in', 'out'));
});